Skip to content

Conversation

@didoda
Copy link
Member

@didoda didoda commented Feb 7, 2025

This introduces a change in "fast creation" of objects, that was available in side panel, on relation add objects flow.

The fast creation form UI has been completely redesigned and it's available in the main view page, contextual to each relation section.

Permissions

Fast creation section is visible only if authenticated user has "write" permissions on the module, and the allowed types (modules) selectable are the ones the user has write access to.

I18n

Fields labels are translated getting i18n data from BEM or plugin(s).

Customization

You can customize it, if you want, using the configuration UI.fast_create_form._element. Example:

'UI' => [
    'fast_create_form' => [
        '_element' => 'MyPlugin.Form/fast_create',
    ],
],

User interface

image

When you click on the area (as suggested by the main message), you can start by selecting the object type (the list of types depends on the specific relation), or you see directly a form, when only one object type is available as "right" element for the relation.

image

The form data depends on the selected type (you can customize it using Properties.<objectType>.fastCreate configuration, see https://github.com/bedita/manager/wiki/Setup:-Properties-display#fastcreate).
There is a basic validation: "Save" is disabled if you do not fill all required fields.

image

When you save, the new item is added in the relation section... ready to be saved as a new related item.

image

@didoda didoda added feature New feature or request release:minor labels Feb 7, 2025
@didoda didoda added this to the 5.x milestone Feb 7, 2025
@codecov
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (3d9a2a0) to head (5174c25).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1225   +/-   ##
=========================================
  Coverage     99.66%   99.66%           
  Complexity     1351     1351           
=========================================
  Files            98       98           
  Lines          5327     5327           
=========================================
  Hits           5309     5309           
  Misses           18       18           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@didoda didoda marked this pull request as ready for review February 7, 2025 11:41
@didoda didoda merged commit a2502be into bedita:master Feb 17, 2025
9 checks passed
@didoda didoda deleted the feat/fast-create-form branch February 17, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request release:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant